<template>
   <div>
     ACommon..
     {{ num }}
   </div>
</template>
<script>
export default {
  name: "ACommon",
  data() { 
    return {
      num : 0,
    }
  },
  methods: {
    setNum() { 
      return this.num++;
    }
  },
  mounted(){
    this.$bus.$on("setNum", this.setNum);
  },
  beforeDestroy() { 
    this.$bus.$off("setNum", this.setNum);
  }

}
</script>
<style>

</style>